package tmproject.hlhj.fhp.cartrans.http

import android.content.Context
import io.reactivex.disposables.Disposable
import io.reactivex.functions.Consumer
import rx.functions.Action0
import tmproject.hlhj.fhp.cartrans.utils.LoadingUtil

/**
 * Created by Administrator on 2018/8/23/023.
 */
class LoadingAction(private val context: Context,private val showLoading:Boolean?=null):Consumer<Disposable> {
    override fun accept(t: Disposable) {
        if (showLoading==null){
            LoadingUtil.showLoading(context)
        }else{
            if (showLoading){
                LoadingUtil.showLoading(context)
            }
        }

    }

}